package Jasper.service;


import Jasper.entity.Page;
import Jasper.entity.Product;
import Jasper.entity.Type;
import Jasper.entity.User;

import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

/**
 * @ClassName IUserService
 * @Author jiangjiajia
 * @JDK-Version 1.8
 * @Date 2021/5/20 7:25 pm
 * @Version 1.0
 * @Description 必须描述类的业务用途
 **/
public interface IUserService {

    /**
     * 校验用户名是否存在
     * @param username
     * @return
     */
    String checkUsername(String username);

    /**
     * 校验用户名和密码是否正确
     *
     * @param username
     * @param password
     * @return
     */
    Type checkUser(HttpServletRequest request, HttpServletResponse response, String username, String password, String remember);

    /**
     * 用户注册
     * @param user
     * @return
     */
    Type addUser(User user);
//    分页查询商品，返回结果集


    /**
     * 获取产品分页对象
     *
     * @param currentPage 当前页
     * @return
     */
    Page getPage(int currentPage);


    /**
     * 商品上架
     *
     * @param product
     * @return
     */
    Type addProducr(Product product);
}

